package com.cd.service.property.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cd.bean.Property;
import com.cd.dao.PropertyMapper;
import com.cd.service.property.PropertyService;

/**
 * 产业体系
 *@Author zhk
 *@Date 2018-1-2
 **/
@Service("propertyService")
public class PropertyServiceImpl implements PropertyService{

	@Autowired
	PropertyMapper propertyMapper;
	
	@Override
	public void save(Property property) throws Exception {
		propertyMapper.save(property);
	}

	@Override
	public void delete(Integer id) throws Exception {
		propertyMapper.delete(id);
	}

	@Override
	public void edit(Property property) throws Exception {
		propertyMapper.update(property);
	}

	@Override
	public List<Property> listAll() throws Exception {
		
		return propertyMapper.queryByList();
	}

	@Override
	public Property findById(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return propertyMapper.query(id);
	}

	@Override
	public void deleteAll() throws Exception {
		// TODO Auto-generated method stub
		/*
		*
		*@return 
		*@param
		*@throws
		*/
	}

	@Override
	public Integer size() throws Exception {
		// TODO Auto-generated method stub
		return propertyMapper.getCount();
	}

	@Override
	public List<Property> listLimit() throws Exception {
		// TODO Auto-generated method stub
		return propertyMapper.list();
	}

}
